/**
 * 判断value字符串是否为空 
 * @param {string} value
 * @returns {Boolean}
 */
export function isEmpty(value: any): boolean {
  if (value == null || value == "" || value == undefined || value == "undefined") {
    return true
  }
  return false
}

/**
 * 验证用户名
 * @param {string} str
 * @returns {Boolean}
 */
export function validUsername(str: string): boolean {
  return str.trim().length > 0
}

/**
 * 验证密码
 * @param {string} str
 * @returns {Boolean}
 */
export function validPassword(str: string): boolean {
  return str.length > 0
}

/**
 * 验证验证码
 * @param {string} str
 * @returns {Boolean}
 */
export function validCode(str: string): boolean {
  return str.length > 0
} 